//
//  File.swift
//
//
//  Created by didi on 2022/9/13.
//

import Fluent
import Vapor

struct SystemMetadataRepository: MolecularModelRepository {
    typealias DatabaseModel = SystemMetadataModel

    public private(set) var db: Database

    init(_ db: Database) {
        self.db = db
    }

    func listFeedItems() async throws -> [DatabaseModel] {
        try await query().filter(\.$feedItem == true).all()
    }
}
